Search Java Code Snippets


  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.





#Java - Code Snippets for '#Org.apache.ace.client.repository.object.Artifact2FeatureAssociation' - 1 code snippet(s) found

 Sample 1. Code Sample / Example / Snippet of org.apache.ace.client.repository.object.Artifact2FeatureAssociation

    public void testGetAssociationsWith() {

initializeRepositoryAdmin();

ArtifactObject a1 = createBasicArtifactObject("artifact1");

FeatureObject f1 = createBasicFeatureObject("feature1");

Artifact2FeatureAssociation a2f1 = m_artifact2FeatureRepository.create(a1, f1);



List<Artifact2FeatureAssociation> b1Associations = a1.getAssociationsWith(f1);

List<Artifact2FeatureAssociation> g1Associations = f1.getAssociationsWith(a1);



assert b1Associations.size() == 1 : "The artifact has exactly one association to the feature, but it shows " + b1Associations.size() + ".";

assert b1Associations.get(0) == a2f1 : "The artifact's association should be the one we created.";



assert g1Associations.size() == 1 : "The feature has exactly one association to the artifact.";

assert g1Associations.get(0) == a2f1 : "The feature's association should be the one we created.";

}


   Like      Feedback      org.apache.ace.client.repository.object.Artifact2FeatureAssociation



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner